﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using RealEstateBrowser.ViewModels;

namespace RealEstateBrowser.Commands
{
    public class FilterCommand : ICommand
    {
        private MainViewModel mainVM;

        public FilterCommand(MainViewModel mainVM)
        {
            this.mainVM = mainVM;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            mainVM.FilterOffers() ;
        }
    }
}
